package com.yyaccp.appinfo.utils;

import com.yyaccp.appinfo.domain.AppInfo;

import java.util.List;

public class Page {

    private int totalCount;
    private int totalPageCount;
    private int pageSize;
    private int currPage;
    private List<AppInfo> list;

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
        this.totalPageCount = this.totalCount%this.pageSize == 0 ?(this.totalCount/this.pageSize):(this.totalCount/this.pageSize)+1;
    }

    public int getTotalPageCount() {
        return totalPageCount;
    }

    public void setTotalPageCount(int totalPageCount) {
        this.totalPageCount = totalPageCount;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getCurrPage() {
        return currPage;
    }

    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }

    public List<AppInfo> getList() {
        return list;
    }

    public void setList(List<AppInfo> list) {
        this.list = list;
    }
}
